
"f-string 格式化"

s = "Hello"
# 左对齐 8个字符
formatted_s = f"{s:<8} --"
print(formatted_s)
'Hello    --'

s = "Hello"
# 左对齐 16个字符
formatted_s = "{:<16}:".format(s)
print(formatted_s)
'Hello           :'